package cn.felord.common.aop;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Dax
 * @since 22:49 2018/5/3
 */
@ControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    @RequestMapping
    public String defaultHandler(HttpServletRequest request, Exception e) throws Exception {
     return "/index.html";
    }

}
